<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function cfb (n) {
      for (var i = 1; i <= n; i++) {
        for (var j = 1; j <= i; j++) {
          document.write(j + 'x' + i + '=' + i*j + '&nbsp;')
        }
        document.write('<br>')
      }
    }
    var num = prompt('输入你要打印几阶乘法表')
    cfb(num)
  </script>
</body>
</html>